package com.liuchong.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: liuchong
 * @create: 2023/3/6 14:48
 * @description:
 */
@Component
public class SpringRabbitListener {
    //简单类型消息
    @RabbitListener(queues = "p2p")//声明队列名称
    public void listenSimpleQueueMessage(String msg) {
        System.out.println("消费者接收到消息：【" + msg + "】");
    }
}
